package com.wedata.utils;

import java.io.*;
import java.nio.charset.Charset;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

public class ZIP解压 {

    public static void main(String[] args) throws IOException {
        String fff = "C:\\Users\\admin\\Desktop\\斗拱对账单\\9642f788-b0a3-4119-820e-cf58810aa033.zip";
        File file = new File(fff);
        System.out.println(file.exists());
        ZipFile zipFile = new ZipFile(fff);
        ZipEntry zipEntry = zipFile.entries().nextElement();
        InputStream inputStream = zipFile.getInputStream(zipEntry);
        InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName("GBK"));
        BufferedReader reader = new BufferedReader(inputStreamReader);
        String line;

        while ((line = reader.readLine())!=null){
            System.out.println(line);
            /*String[] values = line.split(",");
            for(int i=0; i<values.length; i++){
                System.out.print(values[i]);
            }
            System.out.println();*/
            String str = "=\"渠道商号\",=\"商户号\",=\"商户名称\",=\"汇付终端号\",=\"凭证号\",=\"汇付订单号\",=\"外部订单号\",=\"交易类型\",=\"交易方式\",=\"交易金额\",=\"商户手续费\",=\"已退款金额\",=\"交易状态\",=\"交易时间\",=\"交易日期\",=\"付款银行卡卡号\",=\"借贷标志\",=\"参考号\",=\"原汇付交易订单号\",=\"原交易参考号\",=\"原外部交易订单号\",=\"收单银行\",=\"手续费出款方\",=\"是否分账\",=\"花呗分期数\",=\"卖家承担手续费比例\",=\"终端订单号\",=\"原交易终端订单号\",=\"产品号\",=\"优惠金额\",=\"交易完成时间\",=\"是否延迟交易\",=\"原凭证号\",=\"商户私有域\",=\"请求流水号\",=\"请求日期\",=\"原交易请求流水号\",=\"原交易请求日期\",=\"用户账单上的交易订单号\",=\"备注\",=\"交易类型中文描述\",=\"组合支付补贴串\",=\"原预授权号\",=\"预授权全局流水号\",=\"账户号\",=\"余额支付串\",=\"全域资金批次号\",=\"全域资金银行汇款订单号\",=\"全域资金汇付汇款订单号\",=\"支付完成时间\",=\"入账客户号\",=\"付款银行名称\",=\"付款方名称\",=\"交易费率公式\",=\"组合支付费率公式\",=\"用户账单上的商户订单号\",=\"费率手续费\",=\"实际手续费\"";
            System.out.println(str.equals(line));
        }
    }

}
